<%@ page language="C#" masterpagefile="~/MasterPage.master" autoeventwireup="true" inherits="Gestion_Default, App_Web_ggbfvv6c" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="contenido" Runat="Server">
    &nbsp;<asp:Panel ID="pnlFacturas" runat="server" Width="100%">
    <script language="javascript" type="text/javascript">
function intOnly(i) 
{
if(i.value.length>0) 
{
i.value = i.value.replace(/[^\d]+/g, ''); 
}
}
</script>
        <br />
        <table width="100%">
            <tr>
                <td align="left" colspan="3" rowspan="1" style="width: 40%; text-align: left" valign="top">
                    Estado :
                    <asp:DropDownList ID="ddlEstadoOT" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlEstadoOT_SelectedIndexChanged">
                    </asp:DropDownList></td>
                <td align="left" colspan="1" rowspan="1" style="width: 40%; text-align: right" valign="top">
                </td>
            </tr>
            <tr>
                <td align="left" colspan="3" rowspan="4" style="width: 40%; text-align: right" valign="top">
                    <asp:GridView ID="gdvOrdenesDeTrabajo" runat="server" AutoGenerateColumns="False"
                        Width="100%" DataKeyNames="Id" OnSelectedIndexChanged="gdvOrdenesDeTrabajo_SelectedIndexChanged" Height="100%" EmptyDataText="No hay datos">
                        <Columns>
                            <asp:TemplateField HeaderText="N&#176;" SortExpression="NumeroOrdenDeTrabajo">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("NumeroOrdenDeTrabajo") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("NumeroOrdenDeTrabajo") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Fecha" SortExpression="Fecha">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Fecha") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("Fecha", "{0:d}") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Cliente" SortExpression="Cliente">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("[Cliente.RazonSocial]") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("Cliente.RazonSocial") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:CommandField SelectText="Seleccionar" ShowSelectButton="True" />
                        </Columns>
                        <RowStyle CssClass="RowStyle" />
        <PagerStyle CssClass="PagerStyle" />
        <HeaderStyle CssClass="HeaderStyle" />
        <AlternatingRowStyle CssClass="AltRowStyle" />
        <SelectedRowStyle CssClass="SelectedRowStyle" />
                        <EmptyDataTemplate>
                            No existen registros<br />
                        </EmptyDataTemplate>
                        <EmptyDataRowStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                    </asp:GridView>
                    &nbsp;&nbsp;</td>
                <td align="left" colspan="1" rowspan="4" style="width: 40%; text-align: right" valign="top">
                    <asp:DataList ID="dtlDetalleOrdenDeTrabajo" runat="server" Width="100%">
                        <HeaderTemplate>
                            <table width="100%" class="HeaderStyle">
                                <tr>
                                    <td style=" width: 40%; text-align: left">
                                        Producto</td>
                                    <td style=" width: 20%; text-align: left">
                                        Cantidad Asignada</td>
                                    <td style=" width: 20%; text-align: left">
                                        Cantidad Utilizada</td>
                                    <td style=" width: 20%; text-align: left">
                                        Monto</td>
                                </tr>
                            </table>
                            <hr />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <table style="border-right-style: none; border-right-color: black" width="100%">
                                <tr>
                                    <td style=" width: 40%; text-align: left">
                                        <asp:Label ID="ProductoLabel" runat="server" Text='<%# Eval("Producto.Descripcion") %>'></asp:Label></td>
                                    <td align="right" style=" width: 20%; text-align: right">
                                        <asp:Label ID="CantidadIngresoLabel" runat="server" Text='<%# Eval("Cantidad") %>'></asp:Label></td>
                                    <td align="right" style=" width: 20%; text-align: right">
                                        <asp:Label ID="lblCantidadDespachada" runat="server" Text='<%# Eval("Despachado") %>'></asp:Label></td>
                                    <td align="right" style=" width: 20%; text-align: right">
                                        <asp:Label ID="lblMonto" runat="server" Text='<%# "$ " + Eval("Monto") %>'></asp:Label></td>
                                </tr>
                            </table>
                        </ItemTemplate>
                        <SeparatorStyle BorderColor="Black" BorderStyle="Solid" />
                    </asp:DataList></td>
            </tr>
            <tr>
            </tr>
            <tr>
            </tr>
        </table>
    </asp:Panel>
    &nbsp; &nbsp;
    &nbsp; &nbsp;&nbsp;
</asp:Content>

